﻿/// <Summary> 
/// $Author: Nikhil Chinchwade 

/// $Creation Date : 
/// </summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using MindTree.PerfWorkbench.Azure.Monitor.Core;

namespace MindTree.PerfWorkbench.Azure.Monitor
{
    /// <summary>
    /// Interaction logic for AzureAppTreeViewControl.xaml
    /// </summary>
    public partial class AzureAppTreeViewControl : UserControl
    {

        public AzureAppTreeViewControl()
        {
            InitializeComponent();
            
        }

        private void RolesView_Expanded(object sender, RoutedEventArgs e)
        {
            TreeViewItem _item = e.OriginalSource as TreeViewItem;
            _item.IsSelected = true;

        }

        private void RolesView_Collapsed(object sender, RoutedEventArgs e)
        {
            TreeViewItem _item = e.OriginalSource as TreeViewItem;
            _item.IsSelected = true;
            
        }

        public void SetContext()
        {
            RolesView.DataContext = AzureMonInstanceContext.AzureApp.AppDeployment;
        }
    }
}
